import javax.xml.bind.annotation.*;
import java.util.List;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Parent {
    
    @XmlElementWrapper(name = "children")
    @XmlElement(name = "record")
    private List<Child> children;

    // 构造函数、getter 和 setter
    public Parent() {}

    public Parent(List<Child> children) {
        this.children = children;
    }

    public List<Child> getChildren() {
        return children;
    }

    public void setChildren(List<Child> children) {
        this.children = children;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Child {
    @XmlElement
    private String name;
    @XmlElement
    private int age;

    @XmlElement(name = "record")  // 每个record元素下包含的a标签
    private List<Record> records;

    // 构造函数、getter 和 setter
    public Child() {}

    public Child(String name, int age, List<Record> records) {
        this.name = name;
        this.age = age;
        this.records = records;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<Record> getRecords() {
        return records;
    }

    public void setRecords(List<Record> records) {
        this.records = records;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Record {
    @XmlElement
    private int a;

    // 构造函数、getter 和 setter
    public Record() {}

    public Record(int a) {
        this.a = a;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }
}
